<template>
  <div id="app">
    <ul>
      <li v-for="(item, index) in list" :key="index">
        {{ item.name }}
      </li>
    </ul>
    <div class="contents">
      <ul>
        <li>
          <div class="title">
            <h4><span></span> 纯手工水饺 &gt;</h4>
            <p>已送达</p>
          </div>
          <div class="tab"></div>
          <div class="food">
            <ul>
              <li>
                 <img src="../../assets/img/store2.png" alt="">
              </li>
            </ul>
            <div>
              <p>￥18.3</p>
              <p>共2件</p>
            </div>
          </div>

          <div class="reback"><p>再来一单</p></div>
        </li>
                <li>
          <div class="title">
            <h4><span></span> 纯手工水饺 &gt;</h4>
            <p>已送达</p>
          </div>
          <div class="tab"></div>
          <div class="food">
            <ul>
              <li>
               <img src="../../assets/img/store2.png" alt="">
              </li>
            </ul>
            <div>
              <p>￥18.3</p>
              <p>共2件</p>
            </div>
          </div>

          <div class="reback"><p>再来一单</p></div>
        </li>
                <li>
          <div class="title">
            <h4><span></span> 纯手工水饺 &gt;</h4>
            <p>已送达</p>
          </div>
          <div class="tab"></div>
          <div class="food">
            <ul>
              <li>
                 <img src="../../assets/img/store2.png" alt="">
              </li>
            </ul>
            <div>
              <p>￥20</p>
              <p>共2件</p>
            </div>
          </div>

          <div class="reback"><p>再来一单</p></div>
        </li>
    
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        { name: "全部" },
        { name: "待消费" },
        { name: "待评价" },
        { name: "退款" },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
#app {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  & > ul {
    position: fixed;
    height: 40px;
    left: 0;
    right: 0;
    top: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    li {
      margin-right: 20px;
    }
  }

  .contents {
    margin-top: 40px;
    overflow-y: auto;
    height: 560px;
    // flex: 1;
    & > ul {
      padding: 0 15px;
      box-sizing: border-box;
      
      & > li {
        // height: 150px;
        margin-bottom: 15px;
        padding: 15px;
        background-color: white;
        .title {
          display: flex;
          justify-content: space-between;
          align-items: center;
          height: 20px;
          h4 {
            display: flex;
            font-size: 18px;
            align-items: center;
            span {
              display: block;
              height: 20px;
              width: 20px;
              background-color: #0094ff;
              margin-right: 5px;
            }
          }

          p {
            font-size: 14px;
            color: #ccc;
          }
        }
        .tab {
          height: 10px;
        }
        .food {
          display: flex;
          align-items: center;
          justify-content: space-between;
          height: 84px;
          ul {
            display: flex;
            align-items: center;
            height: 100%;

            li {
              width: 65px;
              height: 65px;
              background-color: red;
              border-radius: 5px;
              img {
                width: 100%;
                height: 100%;
                border-radius: 5px;
              }
            }
          }
          div {
            display: flex;
            flex-direction: column;
            justify-content: center;
            text-align: center;
            & > p:first-child {
              font-weight: bold;
              margin-bottom: 10px;
            }
            & > p:last-child {
              color: #ccc;
              font-size: 12px;
            }
          }
        }
        .reback {
          height: 36px;
          display: flex;
          justify-content: flex-end;
          p {
            height: 100%;
            box-sizing: border-box;
            padding: 5px 20px;
            border-radius: 18px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid #0094ff;
            color: #0094ff;
          }
        }
      }
    }
  }
}
</style>